<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Interrupt Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__ctb__functions__interrupts.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Interrupt Functions<div class="ingroups"><a class="el" href="group__group__ctb.html">CTB          (Continuous Time Block)</a> &raquo; <a class="el" href="group__group__ctb__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>This set of functions is related to the comparator interrupts. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa05d09b4e77c18c5279aa3353875d85c"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__interrupts.html#gaa05d09b4e77c18c5279aa3353875d85c">Cy_CTB_GetInterruptStatus</a> (const <a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> compNum)</td></tr>
<tr class="memdesc:gaa05d09b4e77c18c5279aa3353875d85c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the status of the interrupt when the configured comparator edge is detected.  <a href="#gaa05d09b4e77c18c5279aa3353875d85c">More...</a><br /></td></tr>
<tr class="separator:gaa05d09b4e77c18c5279aa3353875d85c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8ad429bd10d7fae38c5a95a77785a60"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__interrupts.html#gad8ad429bd10d7fae38c5a95a77785a60">Cy_CTB_ClearInterrupt</a> (<a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> compNum)</td></tr>
<tr class="memdesc:gad8ad429bd10d7fae38c5a95a77785a60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the CTB comparator triggered interrupt.  <a href="#gad8ad429bd10d7fae38c5a95a77785a60">More...</a><br /></td></tr>
<tr class="separator:gad8ad429bd10d7fae38c5a95a77785a60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacaf04d0238203abed108dcc5ae7e765d"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__interrupts.html#gacaf04d0238203abed108dcc5ae7e765d">Cy_CTB_SetInterrupt</a> (<a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> compNum)</td></tr>
<tr class="memdesc:gacaf04d0238203abed108dcc5ae7e765d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Force the CTB interrupt to trigger using software.  <a href="#gacaf04d0238203abed108dcc5ae7e765d">More...</a><br /></td></tr>
<tr class="separator:gacaf04d0238203abed108dcc5ae7e765d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga77961fdd9eef9504ff17e70577b5ea07"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__interrupts.html#ga77961fdd9eef9504ff17e70577b5ea07">Cy_CTB_SetInterruptMask</a> (<a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> compNum)</td></tr>
<tr class="memdesc:ga77961fdd9eef9504ff17e70577b5ea07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the CTB comparator edge interrupt to be forwarded to the CPU interrupt controller.  <a href="#ga77961fdd9eef9504ff17e70577b5ea07">More...</a><br /></td></tr>
<tr class="separator:ga77961fdd9eef9504ff17e70577b5ea07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga41785a38fe4f39c2060c4126061ac349"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__interrupts.html#ga41785a38fe4f39c2060c4126061ac349">Cy_CTB_GetInterruptMask</a> (const <a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> compNum)</td></tr>
<tr class="memdesc:ga41785a38fe4f39c2060c4126061ac349"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return whether the CTB comparator edge interrupt output is forwarded to the CPU interrupt controller as configured by <a class="el" href="group__group__ctb__functions__interrupts.html#ga77961fdd9eef9504ff17e70577b5ea07">Cy_CTB_SetInterruptMask</a>.  <a href="#ga41785a38fe4f39c2060c4126061ac349">More...</a><br /></td></tr>
<tr class="separator:ga41785a38fe4f39c2060c4126061ac349"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3da4b3a6ad917138d0b9fef001c8db76"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__interrupts.html#ga3da4b3a6ad917138d0b9fef001c8db76">Cy_CTB_GetInterruptStatusMasked</a> (const <a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> compNum)</td></tr>
<tr class="memdesc:ga3da4b3a6ad917138d0b9fef001c8db76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the CTB comparator edge output interrupt state after being masked.  <a href="#ga3da4b3a6ad917138d0b9fef001c8db76">More...</a><br /></td></tr>
<tr class="separator:ga3da4b3a6ad917138d0b9fef001c8db76"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaa05d09b4e77c18c5279aa3353875d85c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa05d09b4e77c18c5279aa3353875d85c">&#9670;&nbsp;</a></span>Cy_CTB_GetInterruptStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_CTB_GetInterruptStatus </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>compNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the status of the interrupt when the configured comparator edge is detected. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">compNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The interrupt status. If compNum is <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a>, cast the returned status to <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> to determine which comparator edge (or both) was detected.<ul>
<li>0: Edge was not detected</li>
<li>Non-zero: Configured edge type was detected</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: Both opamps have been configured as comparators with interrupts enabled.</span></div><div class="line"><span class="comment">     * Retrieve the interrupt status to determine which interrupt was triggered. */</span></div><div class="line">    uint32_t intrStatus;</div><div class="line">    </div><div class="line">    intrStatus = <a class="code" href="group__group__ctb__functions__interrupts.html#gaa05d09b4e77c18c5279aa3353875d85c">Cy_CTB_GetInterruptStatus</a>(CTBM0, <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a>);</div><div class="line"></div><div class="line">    <span class="comment">/* Clear both comparator interrupts so that subsequent interrupts can be handled. */</span></div><div class="line">    <a class="code" href="group__group__ctb__functions__interrupts.html#gad8ad429bd10d7fae38c5a95a77785a60">Cy_CTB_ClearInterrupt</a>(CTBM0, <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a>);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a> == (intrStatus &amp; <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Do something when comparator 0 interrupt occurs. */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a> == (intrStatus &amp; <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Do something when comparator 1 interrupt occurs. */</span></div><div class="line">    }</div></div><!-- fragment -->
</div>
</div>
<a id="gad8ad429bd10d7fae38c5a95a77785a60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad8ad429bd10d7fae38c5a95a77785a60">&#9670;&nbsp;</a></span>Cy_CTB_ClearInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_CTB_ClearInterrupt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>compNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear the CTB comparator triggered interrupt. </p>
<p>The interrupt must be cleared with this function so that the hardware can set subsequent interrupts and those interrupts can be forwarded to the interrupt controller, if enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">compNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="gacaf04d0238203abed108dcc5ae7e765d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacaf04d0238203abed108dcc5ae7e765d">&#9670;&nbsp;</a></span>Cy_CTB_SetInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_CTB_SetInterrupt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>compNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Force the CTB interrupt to trigger using software. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">compNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="ga77961fdd9eef9504ff17e70577b5ea07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga77961fdd9eef9504ff17e70577b5ea07">&#9670;&nbsp;</a></span>Cy_CTB_SetInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_CTB_SetInterruptMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>compNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure the CTB comparator edge interrupt to be forwarded to the CPU interrupt controller. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">compNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9e99c0e580cf26beea9ba5a088d20738">CY_CTB_OPAMP_NONE</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a>. Calling this function with CY_CTB_OPAMP_NONE will disable all interrupt requests.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: Enable interrupt request for both comparators. */</span></div><div class="line"></div><div class="line">    <a class="code" href="group__group__ctb__functions__interrupts.html#ga77961fdd9eef9504ff17e70577b5ea07">Cy_CTB_SetInterruptMask</a>(CTBM0, <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a>);</div><div class="line">    </div></div><!-- fragment -->
</div>
</div>
<a id="ga41785a38fe4f39c2060c4126061ac349"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga41785a38fe4f39c2060c4126061ac349">&#9670;&nbsp;</a></span>Cy_CTB_GetInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_CTB_GetInterruptMask </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>compNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return whether the CTB comparator edge interrupt output is forwarded to the CPU interrupt controller as configured by <a class="el" href="group__group__ctb__functions__interrupts.html#ga77961fdd9eef9504ff17e70577b5ea07">Cy_CTB_SetInterruptMask</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">compNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The interrupt mask. If compNum is <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a>, cast the returned mask to <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> to determine which comparator interrupt output (or both) is forwarded.<ul>
<li>0: Interrupt output not forwarded to interrupt controller</li>
<li>Non-zero: Interrupt output forwarded to interrupt controller</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: Check if comparator 0 interrupts are enabled. If not, enable it. */</span></div><div class="line">    uint32_t intrMask;</div><div class="line">       </div><div class="line">    intrMask = <a class="code" href="group__group__ctb__functions__interrupts.html#ga41785a38fe4f39c2060c4126061ac349">Cy_CTB_GetInterruptMask</a>(CTBM0, CY_CTB_OPAMP_0);</div><div class="line">    <span class="keywordflow">if</span> (0UL == intrMask)</div><div class="line">    {</div><div class="line">        <a class="code" href="group__group__ctb__functions__interrupts.html#ga77961fdd9eef9504ff17e70577b5ea07">Cy_CTB_SetInterruptMask</a>(CTBM0, CY_CTB_OPAMP_0);</div><div class="line">    }</div></div><!-- fragment -->
</div>
</div>
<a id="ga3da4b3a6ad917138d0b9fef001c8db76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3da4b3a6ad917138d0b9fef001c8db76">&#9670;&nbsp;</a></span>Cy_CTB_GetInterruptStatusMasked()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_CTB_GetInterruptStatusMasked </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>compNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the CTB comparator edge output interrupt state after being masked. </p>
<p>This is the bitwise AND of <a class="el" href="group__group__ctb__functions__interrupts.html#gaa05d09b4e77c18c5279aa3353875d85c">Cy_CTB_GetInterruptStatus</a> and <a class="el" href="group__group__ctb__functions__interrupts.html#ga41785a38fe4f39c2060c4126061ac349">Cy_CTB_GetInterruptMask</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">compNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If compNum is <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a>, cast the returned value to <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> to determine which comparator interrupt output (or both) is detected and masked.<ul>
<li>0: Configured edge not detected or not masked</li>
<li>Non-zero: Configured edge type detected and masked </li>
</ul>
</dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
